<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>while学习</title>

    <script>
        var i = 1;
        while (i <= 100) {
            console.log('人的第' + i + '岁');
            i++;
        }


        var sum = 0;
        i = 0
        while (i <= 100) {
            sum += i;
            i++;
        }
        console.log(sum);
    </script>

</head>

<body>

</body>

</html>